/**
   nc_writer.h - Created by Timothy Morey on 2/8/2012.
 */

#ifndef __NC_WRITER_H
#define __NC_WRITER_H

/**
   The NCWriter object manages the output of data from the forest fire model to
   a NetCDF file.
 */
class NCWriter
{
public:
  NCWriter(const char* filename, unsigned short forestWidth, unsigned short forestHeight);
  ~NCWriter();

public:
  void WriteStep(unsigned int* forest, unsigned int stepNum);

protected:
  void ReportNCError(int err);

protected:
  int _NCID;

  int _ColDimID;
  int _RowDimID;
  int _StepDimID;
  int _ValueVarID;

  unsigned short _ForestWidth;
  unsigned short _ForestHeight;
};

#endif
